<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Ajax extends CI_Controller {
    
    private $data = array();

    public function  __construct() {
        parent::__construct();
        //Load Helper and library
        $this->load->helper("url");
        $this->load->library("ci_smarty");
        $this->load->helper("text"); 
        $this->data['base_url'] = base_url();
        $this->data['root_url'] = $this->config->item('root_url');

       // $this->output->enable_profiler(TRUE);
        //Load Model

        $this->load->Model("Mchapter");
    }

    // process for chapter table
    public function chapterError()
    {
     
        $data['chapterID'] = $this->input->get('chapterID');
        $data['book_name'] = $this->input->get('bookName');
        $data['chapter_no'] = $this->input->get('chapterNo');
        $data['url'] = $this->input->get('url');

        $this->Mchapter->insertChapterError($data); 
        $res = 1;
        echo $res;
    }
}